import request from '@/utils/request'

/**
 * 获取获取-部门列表
 */
export const getUSerinfo = () => {
  return request({
    url: '/company/department'
  })
}

/**
 * 获取删除API
 *
 */
export const deleteListAPi = (id) => {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}

/**
 * 获取-部门负责人列表
 *
 */
export const getListAPi = () => {
  return request({
    url: '/sys/user/simple'
  })
}

/**
 * 获取新增部门
 *
 */
export const addList = (data) => {
  return request({
    method: 'post',
    url: '/company/department',
    data: data
  })
}

/**
 * 获取-部门详情
 */
export const GETList = (id) => {
  return request({
    url: `/company/department/${id}`
  })
}

/**
 * 修改-部门详情
 *
 */
export const AgainAddList = (data) => {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data: data
  })
}
